-- CALC_SUMMON_DODGE

-- 计算召唤兽当前闪避
-- @param summon    召唤兽
return function(summon)
    local dodge = summon:query("dodge") or 0;
    local classId = summon.class_id;

    -- 如果要用玩家的闪避
    if SummonM.query(classId, "dbase")["user_dodge"] == 1 then
        dodge =  dodge + FormulaM.invoke("CALC_USER_DODGE", ME.user);
    end

    -- 2. 绝对值加成
    local propId = PropM.getPropId("attrib2");
    local prop = PropM.combine(summon, propId, "dodge");
    dodge = PropM.apply(prop, dodge);

    -- 所有召唤物闪避加
    prop = PropM.combine(ME.user, "summon_attrib", "dodge");
    dodge = PropM.apply(prop, dodge);

    return dodge;
end
